import { createApp } from 'vue'

import App from './App.vue'
import router from './router'
// import ElementPlus from 'element-plus'
// import zhCn from 'element-plus/es/locale/lang/zh-cn'
import './style.css'
import './styles/main.css'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'

import * as ElIcons from '@element-plus/icons-vue' //element plus图标
import { createPinia } from 'pinia'

import worker from '../mock'

const app = createApp(App)
const pinia = createPinia()

// 自动注册图标
for (const name in ElIcons) {
  app.component(name, ElIcons[name])
}

if (import.meta.env.MODE === 'development') {
  worker.start()
}

app.use(router)
// app.use(ElementPlus, {
//   locale: zhCn,
// })
app.use(pinia)
app.mount('#app')
